package com.zy.reflect.privateaccess;

/**
 * @Author Gong
 * @Description
 * @dATE 2021/12/20 9:35
 **/
public class Person {
    public String name;
    private Integer age;

    public Person() {

    }

    private Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public  void show(){
        String str="SHOW: [name=" + name + ", age=" + age + "]";
        System.out.println(str);
    }
    public static void info(){
        String str="info: ....";
        System.out.println(str);
    }
    private String say(String sth,Integer x){
        System.out.println("say:"+sth +"x:"+x);
        return sth;
    }
    public  void display(String nation){
        System.out.println("My Address is "+nation);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
